<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::AudioChannel Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="struct_sifteo_1_1_audio_channel.html">AudioChannel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="struct_sifteo_1_1_audio_channel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::AudioChannel Struct Reference<div class="ingroups"><a class="el" href="group__audio.html">Audio</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>One mixer channel, capable of playing AudioAssets.  
 <a href="struct_sifteo_1_1_audio_channel.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="audio_8h_source.html">sifteo/audio.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a2dccc94619b8f5f1aa1ee76868a788a0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">LoopMode</a> { <a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">UNDEF_LOOP</a> = _SYS_LOOP_UNDEF, 
<a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a36efd06d6d5cbd61d6bf1764abf96cf6">ONCE</a> = _SYS_LOOP_ONCE, 
<a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0acd23158663eb96c3b3ae8559f528631c">REPEAT</a> = _SYS_LOOP_REPEAT
 }</td></tr>
<tr class="memdesc:a2dccc94619b8f5f1aa1ee76868a788a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loop modes available for use in <a class="el" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d" title="Begin playback of a sample.">play()</a>  <a href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">More...</a><br/></td></tr>
<tr class="separator:a2dccc94619b8f5f1aa1ee76868a788a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0b441bdc83ae3bc396c7e4657771763a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a0b441bdc83ae3bc396c7e4657771763a">AudioChannel</a> ()</td></tr>
<tr class="memdesc:a0b441bdc83ae3bc396c7e4657771763a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a0b441bdc83ae3bc396c7e4657771763a">More...</a><br/></td></tr>
<tr class="separator:a0b441bdc83ae3bc396c7e4657771763a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac5b10271c20056fbdb23dacd3a6c9e5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#aac5b10271c20056fbdb23dacd3a6c9e5">AudioChannel</a> (AudioChannelID id)</td></tr>
<tr class="memdesc:aac5b10271c20056fbdb23dacd3a6c9e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize an <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a> with a concrete value.  <a href="#aac5b10271c20056fbdb23dacd3a6c9e5">More...</a><br/></td></tr>
<tr class="separator:aac5b10271c20056fbdb23dacd3a6c9e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50bd08e0e3d418baa6b91d47572985ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a50bd08e0e3d418baa6b91d47572985ae">init</a> (AudioChannelID id)</td></tr>
<tr class="memdesc:a50bd08e0e3d418baa6b91d47572985ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a channel by assignging it an ID.  <a href="#a50bd08e0e3d418baa6b91d47572985ae">More...</a><br/></td></tr>
<tr class="separator:a50bd08e0e3d418baa6b91d47572985ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f502b90868d0665765d2ebf2f312b89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f502b90868d0665765d2ebf2f312b89"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a0f502b90868d0665765d2ebf2f312b89">isPlaying</a> () const </td></tr>
<tr class="memdesc:a0f502b90868d0665765d2ebf2f312b89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this channel currently playing a sample? <br/></td></tr>
<tr class="separator:a0f502b90868d0665765d2ebf2f312b89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3cdbd0b622e862f3660fafbfde66910"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#aa3cdbd0b622e862f3660fafbfde66910">pause</a> () const </td></tr>
<tr class="memdesc:aa3cdbd0b622e862f3660fafbfde66910"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pause the currently playing sample in this channel.  <a href="#aa3cdbd0b622e862f3660fafbfde66910">More...</a><br/></td></tr>
<tr class="separator:aa3cdbd0b622e862f3660fafbfde66910"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22b9713a30f05ad739106c53f4dc700d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d">play</a> (const <a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a> &amp;asset, <a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">LoopMode</a> loopMode=<a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">UNDEF_LOOP</a>) const </td></tr>
<tr class="memdesc:a22b9713a30f05ad739106c53f4dc700d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Begin playback of a sample.  <a href="#a22b9713a30f05ad739106c53f4dc700d">More...</a><br/></td></tr>
<tr class="separator:a22b9713a30f05ad739106c53f4dc700d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ba92184207da67652c02b6fa56c594"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a39ba92184207da67652c02b6fa56c594">resume</a> () const </td></tr>
<tr class="memdesc:a39ba92184207da67652c02b6fa56c594"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resume playback on this channel.  <a href="#a39ba92184207da67652c02b6fa56c594">More...</a><br/></td></tr>
<tr class="separator:a39ba92184207da67652c02b6fa56c594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a075fb9a950a3a4aab9fe421f359731b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a075fb9a950a3a4aab9fe421f359731b8">setSpeed</a> (unsigned hz) const </td></tr>
<tr class="memdesc:a075fb9a950a3a4aab9fe421f359731b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the speed of this channel, in samples per second.  <a href="#a075fb9a950a3a4aab9fe421f359731b8">More...</a><br/></td></tr>
<tr class="separator:a075fb9a950a3a4aab9fe421f359731b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed985544edfd48167cddba29e8630f33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#aed985544edfd48167cddba29e8630f33">setVolume</a> (int <a class="el" href="struct_sifteo_1_1_audio_channel.html#a7b35b8235227b210d41db1ae1d7dcf28">volume</a>) const </td></tr>
<tr class="separator:aed985544edfd48167cddba29e8630f33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a314b557ae0e9d2d610c403a4f8554"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#af7a314b557ae0e9d2d610c403a4f8554">stop</a> () const </td></tr>
<tr class="memdesc:af7a314b557ae0e9d2d610c403a4f8554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop playback of the current sample.  <a href="#af7a314b557ae0e9d2d610c403a4f8554">More...</a><br/></td></tr>
<tr class="separator:af7a314b557ae0e9d2d610c403a4f8554"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b35b8235227b210d41db1ae1d7dcf28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b35b8235227b210d41db1ae1d7dcf28"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a7b35b8235227b210d41db1ae1d7dcf28">volume</a> () const </td></tr>
<tr class="memdesc:a7b35b8235227b210d41db1ae1d7dcf28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current volume for this channel. <br/></td></tr>
<tr class="separator:a7b35b8235227b210d41db1ae1d7dcf28"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a9bce5a5aaf89e7a1eb0f723dc3885475"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9bce5a5aaf89e7a1eb0f723dc3885475"></a>
static const int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a9bce5a5aaf89e7a1eb0f723dc3885475">MAX_VOLUME</a> = _SYS_AUDIO_MAX_VOLUME</td></tr>
<tr class="memdesc:a9bce5a5aaf89e7a1eb0f723dc3885475"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum volume for an <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a>. <br/></td></tr>
<tr class="separator:a9bce5a5aaf89e7a1eb0f723dc3885475"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4289072f1db515238941dc84099a7de8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4289072f1db515238941dc84099a7de8"></a>
static const AudioChannelID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a4289072f1db515238941dc84099a7de8">NUM_CHANNELS</a> = _SYS_AUDIO_MAX_CHANNELS</td></tr>
<tr class="memdesc:a4289072f1db515238941dc84099a7de8"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum number of supported AudioChannels in the system. <br/></td></tr>
<tr class="separator:a4289072f1db515238941dc84099a7de8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add25e560eadc585a0cb132025a08e1d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add25e560eadc585a0cb132025a08e1d7"></a>
static const AudioChannelID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_sifteo_1_1_audio_channel.html#add25e560eadc585a0cb132025a08e1d7">UNDEFINED</a> = _SYS_AUDIO_INVALID_CHANNEL_ID</td></tr>
<tr class="memdesc:add25e560eadc585a0cb132025a08e1d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">A reserved ID, used to mark undefined AudioChannels. <br/></td></tr>
<tr class="separator:add25e560eadc585a0cb132025a08e1d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>One mixer channel, capable of playing AudioAssets. </p>
<p>Supported sample formats are ADPCM and standard PCM format. <code>stir</code> processes your audio samples as part of the application packaging process. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a2dccc94619b8f5f1aa1ee76868a788a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">Sifteo::AudioChannel::LoopMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loop modes available for use in <a class="el" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d" title="Begin playback of a sample.">play()</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510"></a>UNDEF_LOOP</em>&nbsp;</td><td class="fielddoc">
<p>Default to the loop mode specified in Stir </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a2dccc94619b8f5f1aa1ee76868a788a0a36efd06d6d5cbd61d6bf1764abf96cf6"></a>ONCE</em>&nbsp;</td><td class="fielddoc">
<p>Play once only (do not loop) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a2dccc94619b8f5f1aa1ee76868a788a0acd23158663eb96c3b3ae8559f528631c"></a>REPEAT</em>&nbsp;</td><td class="fielddoc">
<p>Repeat indefinitely </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0b441bdc83ae3bc396c7e4657771763a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Sifteo::AudioChannel::AudioChannel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>By default, an <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a> is initialized to a special UNDEFINED value - initialize this value via <a class="el" href="struct_sifteo_1_1_audio_channel.html#a50bd08e0e3d418baa6b91d47572985ae" title="Initialize a channel by assignging it an ID.">init()</a> before using the channel. </p>

</div>
</div>
<a class="anchor" id="aac5b10271c20056fbdb23dacd3a6c9e5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Sifteo::AudioChannel::AudioChannel </td>
          <td>(</td>
          <td class="paramtype">AudioChannelID&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize an <a class="el" href="struct_sifteo_1_1_audio_channel.html" title="One mixer channel, capable of playing AudioAssets.">AudioChannel</a> with a concrete value. </p>
<p>If you use this constructor, there is no need to call <a class="el" href="struct_sifteo_1_1_audio_channel.html#a50bd08e0e3d418baa6b91d47572985ae" title="Initialize a channel by assignging it an ID.">init()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>must be in the range 0 to NUM_CHANNELS - 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a50bd08e0e3d418baa6b91d47572985ae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::init </td>
          <td>(</td>
          <td class="paramtype">AudioChannelID&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize a channel by assignging it an ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>must be in the range 0 to NUM_CHANNELS - 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa3cdbd0b622e862f3660fafbfde66910"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::pause </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pause the currently playing sample in this channel. </p>
<p>Has no effect if a sample is not currently playing. </p>

</div>
</div>
<a class="anchor" id="a22b9713a30f05ad739106c53f4dc700d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Sifteo::AudioChannel::play </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_sifteo_1_1_asset_audio.html">AssetAudio</a> &amp;&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0">LoopMode</a>&#160;</td>
          <td class="paramname"><em>loopMode</em> = <code><a class="el" href="struct_sifteo_1_1_audio_channel.html#a2dccc94619b8f5f1aa1ee76868a788a0a3e4a76804c5310af8cdbbc501b725510">UNDEF_LOOP</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Begin playback of a sample. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">asset</td><td>specifies the audio asset to playback. </td></tr>
    <tr><td class="paramname">loopMode</td><td>specifies </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a39ba92184207da67652c02b6fa56c594"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::resume </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Resume playback on this channel. </p>
<p>XXX: this may go away in favor of <a class="el" href="struct_sifteo_1_1_audio_channel.html#a22b9713a30f05ad739106c53f4dc700d" title="Begin playback of a sample.">play()</a> </p>

</div>
</div>
<a class="anchor" id="a075fb9a950a3a4aab9fe421f359731b8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::setSpeed </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>hz</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the speed of this channel, in samples per second. </p>
<p>To determine the default speed for an audio sample, you can use <a class="el" href="struct_sifteo_1_1_asset_audio.html#a99caa7d09c00d633d0280eeafc017554" title="Return the default speed for this audio asset, in samples per second.">AssetAudio::speed()</a>. </p>

</div>
</div>
<a class="anchor" id="aed985544edfd48167cddba29e8630f33"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::setVolume </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>volume</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the volume for this channel. May be applied when the channel is either stopped or playing. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>from 0 to MAX_VOLUME </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af7a314b557ae0e9d2d610c403a4f8554"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::AudioChannel::stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stop playback of the current sample. </p>
<p>Has no effect if a sample is not currently playing. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="audio_8h_source.html">audio.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
